package com.burges.net.dataStream.codeRuler.dataInputStream.datasources

import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment

/**
  * 创建人    BurgessLee 
  * 创建时间   2020/1/26 
  * 描述     用于Socket数据源DEMO
  */
object SocketDataSourceDemo {

	def main(args: Array[String]): Unit = {
		val env = StreamExecutionEnvironment.getExecutionEnvironment

		//Unix环境下执行nc -lk 9999启动端口，客户端输入参数数据就可以接收了
		val socketDataStream = env.socketTextStream("localhost", 9999)
		socketDataStream.print()
	}

}
